<?php 
require_once('./function.php');
header('Access-Control-Allow-Origin:*');
header('Content-Type:application/json;charset=utf-8'); 
$code= (string)sys_htmlspecialchart(urlencode($_GET["code"]),ENT_QUOTES);
$callback = (string)sys_htmlspecialchart(urlencode($_GET["callback"]),ENT_QUOTES);
try{
  
$url ="https://map.ckiosk.cn/webAPI/ClientService.asmx/Command?code=".$code."&callback=".$callback;

    $ch = curl_init();
 
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
 
    $output = curl_exec($ch); 
    curl_close($ch);
 
print_r($output);

    }catch(Exception $e){
    var_dump("Message=%s \n",$e->__toString());
    }
?>